home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / ffccflow / ffccflow.lha / ffccc+flow / flow / grinit.for < prev    next >
Encoding:
Text File  |  1992-07-31  |  1.6 KB  |  45 lines

  1.       SUBROUTINE GRINIT(SIZEX,SIZEY,TITLE)
  2. C! Initialise the graphics package
  3. C SIZEX is the (real) width of the plot (world coords)
  4. C SIZEY               height
  5. C TITLE is the text of the title
  6. C
  7. C The purpose of the routine is to initialise the
  8. C graphics environment to a plot of dimensions
  9. C sizex,sizey, with appropriate text height .
  10. C At the end of processing, ENTRY GRCLOSE is called
  11. C to terminate the plot.
  12. C
  13.       INCLUDE 'jobcom.h'
  14.       INCLUDE 'lunits.h'
  15.       CHARACTER*(*) TITLE
  16. C
  17.       FACX = SIZEX/7.
  18.       FACY = SIZEY/7.
  19.       L = LENOCC(TITLE)
  20.       WRITE(LOUTCH,'(A)') '%! PostScript output from FLOW'
  21.       WRITE(LOUTCH,'(A)') '/inch { 72 mul } def'
  22.       WRITE(LOUTCH,*) '/xrel { ',facx,' div inch } def'
  23.       WRITE(LOUTCH,*) '/yrel { ',facy,' div inch } def'
  24.       WRITE(LOUTCH,*) '/Helvetica-Bold findfont 14 scalefont setfont'
  25.       WRITE(LOUTCH,'(A)') '3.2 inch 7.7 inch moveto'
  26.       WRITE(LOUTCH,'(3A)') '(Flow for node ',TITLE(:L),') show'
  27.       WRITE(LOUTCH,'(A)') '.1 inch setlinewidth'
  28.       WRITE(LOUTCH,'(A)') '0.5 inch 0.5 inch moveto'
  29.       WRITE(LOUTCH,'(A)') '7.5 inch 0.5 inch lineto'
  30.       WRITE(LOUTCH,'(A)') '7.5 inch 7.5 inch lineto'
  31.       WRITE(LOUTCH,'(A)') '0.5 inch 7.5 inch lineto'
  32.       WRITE(LOUTCH,'(A)') 'closepath'
  33.       WRITE(LOUTCH,'(A)') 'stroke'
  34.       WRITE(LOUTCH,'(A)') '0.5 inch 0.5 inch translate'
  35.       WRITE(LOUTCH,'(A)') '.01 inch setlinewidth'
  36.       WRITE(LOUTCH,*) '/Helvetica-Bold findfont 8 scalefont setfont'
  37.       RETURN
  38. C
  39. C ENTRY GRCLOSE
  40. C
  41.       ENTRY GRCLOSE
  42. C! Close the graphics package
  43.       WRITE(LOUTCH,'(A)') 'showpage grestore'
  44.       END
  45.